﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using FrameWorkWeb;
using System.Data.SqlClient;
using System.Data;

namespace FrameWork.web.Middle.OperateCS
{
    public class wUser_HZCS
    {

        public void wUser_HZ_Create(enwUser_HZ _enwUser_HZ)
        {
            SqlParameter[] sp = new SqlParameter[2]{
				new SqlParameter("@userID",SqlDbType.Int),
				new SqlParameter("@HZID",SqlDbType.Int),
			
			};
            //

            sp[0].Value = _enwUser_HZ.UserID;
            sp[0].Direction = ParameterDirection.Input;


            //

            sp[1].Value = _enwUser_HZ.HZID;
            sp[1].Direction = ParameterDirection.Input;


            try
            {
                SqlHelperRemote.ExecuteNonQuery(CommandType.StoredProcedure, "dbo.wUser_HZ_Create", sp);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }



        public void wUser_HZ_DeleteByid(enwUser_HZ _enwUser_HZ)
        {
            SqlParameter[] sp = new SqlParameter[1]{
				new SqlParameter("@id",SqlDbType.Int),
			
			};
            //

            sp[0].Value = _enwUser_HZ.Id;
            sp[0].Direction = ParameterDirection.Input;


            try
            {
                SqlHelperRemote.ExecuteNonQuery(CommandType.StoredProcedure, "dbo.wUser_HZ_DeleteByid", sp);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }



        public void wUser_HZ_DeleteByuserID(enwUser_HZ _enwUser_HZ)
        {
            SqlParameter[] sp = new SqlParameter[1]{
				new SqlParameter("@userID",SqlDbType.Int),
			
			};
            //

            sp[0].Value = _enwUser_HZ.UserID;
            sp[0].Direction = ParameterDirection.Input;


            try
            {
                SqlHelperRemote.ExecuteNonQuery(CommandType.StoredProcedure, "dbo.wUser_HZ_DeleteByuserID", sp);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

      
    }
}
